<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Class: Chef::Knife::GithubDiff

    &mdash; Knife Github utilities

</title>

  <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  hasFrames = window.top.frames.main ? true : false;
  relpath = '../../';
  framesUrl = "../../frames.html#!" + escape(window.location.href);
</script>


  <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>


  </head>
  <body>
    <div id="header">
      <div id="menu">

    <a href="../../_index.html">Index (G)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../../Chef.html" title="Chef (class)">Chef</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Knife.html" title="Chef::Knife (class)">Knife</a></span></span>
     &raquo;
    <span class="title">GithubDiff</span>


  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">

    <a class="full_list_link" id="class_list_link"
        href="../../class_list.html">
      Class List
    </a>

    <a class="full_list_link" id="method_list_link"
        href="../../method_list.html">
      Method List
    </a>

    <a class="full_list_link" id="file_list_link"
        href="../../file_list.html">
      File List
    </a>

</div>
      <div class="clear"></div>
    </div>

    <iframe id="search_frame"></iframe>

    <div id="content"><h1>Class: Chef::Knife::GithubDiff



</h1>

<dl class="box">

    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName"><span class='object_link'><a href="../Knife.html" title="Chef::Knife (class)">Chef::Knife</a></span></span>

        <ul class="fullTree">
          <li>Object</li>

            <li class="next"><span class='object_link'><a href="../Knife.html" title="Chef::Knife (class)">Chef::Knife</a></span></li>

            <li class="next">Chef::Knife::GithubDiff</li>

        </ul>
        <a href="#" class="inheritanceTree">show all</a>

      </dd>









    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">lib/chef/knife/github_diff.rb</dd>

</dl>
<div class="clear"></div>









    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">

        <li class="public ">
  <span class="summary_signature">

      <a href="#do_diff-instance_method" title="#do_diff (instance method)">- (Object) <strong>do_diff</strong>(name, version) </a>



  </span>









    <span class="summary_desc"><div class='inline'></div></span>

</li>


        <li class="public ">
  <span class="summary_signature">

      <a href="#get_cookbook_copy-instance_method" title="#get_cookbook_copy (instance method)">- (Object) <strong>get_cookbook_copy</strong>(name, version) </a>



  </span>









    <span class="summary_desc"><div class='inline'></div></span>

</li>


        <li class="public ">
  <span class="summary_signature">

      <a href="#run-instance_method" title="#run (instance method)">- (Object) <strong>run</strong> </a>



  </span>









    <span class="summary_desc"><div class='inline'></div></span>

</li>


    </ul>










  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>


      <div class="method_details first">
  <h3 class="signature first" id="do_diff-instance_method">

    - (<tt>Object</tt>) <strong>do_diff</strong>(name, version)





</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/chef/knife/github_diff.rb', line 110</span>

<span class='kw'>def</span> <span class='id identifier rubyid_do_diff'>do_diff</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_version'>version</span><span class='rparen'>)</span>
  <span class='comment'># Check to see if there is a tag matching the version
</span>  <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_chdir'>chdir</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@github_tmp</span><span class='rbrace'>}</span><span class='tstring_content'>/git/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
  <span class='comment'># Only checkout in github mode
</span>  <span class='kw'>if</span> <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='symbol'>:github</span><span class='rbracket'>]</span>
      <span class='kw'>if</span> <span class='backtick'>`</span><span class='tstring_content'>git tag</span><span class='tstring_end'>`</span></span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_version'>version</span><span class='rparen'>)</span>
        <span class='id identifier rubyid_ui'>ui</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Tag version </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_version'>version</span><span class='rbrace'>}</span><span class='tstring_content'> found, checking that out for diff</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
        <span class='comment'># Tag found so checkout that tag
</span>        <span class='backtick'>`</span><span class='tstring_content'>git checkout -b </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_version'>version</span><span class='rbrace'>}</span><span class='tstring_end'>`</span></span>
        <span class='kw'>if</span> <span class='op'>!</span><span class='gvar'>$?</span><span class='period'>.</span><span class='id identifier rubyid_exitstatus'>exitstatus</span> <span class='op'>==</span> <span class='int'>0</span>
          <span class='id identifier rubyid_ui'>ui</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Failed to checkout branch </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_version'>version</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
          <span class='id identifier rubyid_exit'>exit</span> <span class='int'>1</span>
        <span class='kw'>end</span>
      <span class='kw'>else</span>
        <span class='id identifier rubyid_ui'>ui</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Version </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_version'>version</span><span class='rbrace'>}</span><span class='tstring_content'> of </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> has no tag, using latest for diff</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
      <span class='kw'>end</span>
  <span class='kw'>end</span>

  <span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_remove_entry'>remove_entry</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@github_tmp</span><span class='rbrace'>}</span><span class='tstring_content'>/git/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>/.git</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
  <span class='id identifier rubyid_output'>output</span> <span class='op'>=</span> <span class='backtick'>`</span><span class='tstring_content'>git diff --color </span><span class='embexpr_beg'>#{</span><span class='ivar'>@github_tmp</span><span class='rbrace'>}</span><span class='tstring_content'>/git/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='ivar'>@github_tmp</span><span class='rbrace'>}</span><span class='tstring_content'>/cb/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_version'>version</span><span class='rbrace'>}</span><span class='tstring_content'> 2&gt;&amp;1</span><span class='tstring_end'>`</span></span>
  <span class='kw'>if</span> <span class='id identifier rubyid_output'>output</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>==</span> <span class='int'>0</span>
    <span class='id identifier rubyid_ui'>ui</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>No differences found</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
  <span class='kw'>else</span>
    <span class='id identifier rubyid_ui'>ui</span><span class='period'>.</span><span class='id identifier rubyid_msg'>msg</span><span class='lparen'>(</span><span class='id identifier rubyid_output'>output</span><span class='rparen'>)</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>

      <div class="method_details ">
  <h3 class="signature " id="get_cookbook_copy-instance_method">

    - (<tt>Object</tt>) <strong>get_cookbook_copy</strong>(name, version)





</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/chef/knife/github_diff.rb', line 137</span>

<span class='kw'>def</span> <span class='id identifier rubyid_get_cookbook_copy'>get_cookbook_copy</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_version'>version</span><span class='rparen'>)</span>
  <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_mkdir'>mkdir</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@github_tmp</span><span class='rbrace'>}</span><span class='tstring_content'>/cb</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
  <span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>cookbook</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>download</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>  <span class='id identifier rubyid_name'>name</span> <span class='rbracket'>]</span>
  <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span> <span class='id identifier rubyid_version'>version</span> <span class='kw'>if</span> <span class='id identifier rubyid_version'>version</span>
  <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_chdir'>chdir</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@github_tmp</span><span class='rbrace'>}</span><span class='tstring_content'>/cb</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
  <span class='id identifier rubyid_download'>download</span> <span class='op'>=</span> <span class='const'>Chef</span><span class='op'>::</span><span class='const'>Knife</span><span class='op'>::</span><span class='const'>CookbookDownload</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_download'>download</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='symbol'>:download_directory</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@github_tmp</span><span class='rbrace'>}</span><span class='tstring_content'>/cb</span><span class='tstring_end'>&quot;</span></span>
  <span class='id identifier rubyid_download'>download</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span>

  <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_entries'>entries</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@github_tmp</span><span class='rbrace'>}</span><span class='tstring_content'>/cb</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_d'>d</span><span class='op'>|</span>
    <span class='kw'>if</span> <span class='id identifier rubyid_d'>d</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>-(.*)</span><span class='regexp_end'>/</span></span>
      <span class='id identifier rubyid_version'>version</span> <span class='op'>=</span> <span class='backref'>$1</span>
    <span class='kw'>end</span>
  <span class='kw'>end</span>
  <span class='kw'>return</span> <span class='id identifier rubyid_version'>version</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>

      <div class="method_details ">
  <h3 class="signature " id="run-instance_method">

    - (<tt>Object</tt>) <strong>run</strong>





</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/chef/knife/github_diff.rb', line 51</span>

<span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span>
<span class='comment'># The run method.  The entry point into the class
</span>
  <span class='comment'># validate base options from base module.
</span>  <span class='id identifier rubyid_validate_base_options'>validate_base_options</span>

  <span class='comment'># Display information if debug mode is on.
</span>  <span class='id identifier rubyid_display_debug_info'>display_debug_info</span>

  <span class='comment'># Gather all repo information from github.
</span>  <span class='id identifier rubyid_get_all_repos'>get_all_repos</span> <span class='op'>=</span> <span class='id identifier rubyid_get_all_repos'>get_all_repos</span><span class='lparen'>(</span><span class='ivar'>@github_organizations</span><span class='period'>.</span><span class='id identifier rubyid_reverse'>reverse</span><span class='rparen'>)</span>

  <span class='comment'># Get all chef cookbooks and versions (hopefully chef does the error handeling).
</span>  <span class='id identifier rubyid_cookbooks'>cookbooks</span> <span class='op'>=</span> <span class='id identifier rubyid_rest'>rest</span><span class='period'>.</span><span class='id identifier rubyid_get_rest'>get_rest</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/cookbooks?num_version=1</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>

  <span class='comment'># Get the cookbook name from the command line
</span>  <span class='ivar'>@cookbook_name</span> <span class='op'>=</span> <span class='id identifier rubyid_name_args'>name_args</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span> <span class='kw'>unless</span> <span class='id identifier rubyid_name_args'>name_args</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
  <span class='id identifier rubyid_cookbook_version'>cookbook_version</span> <span class='op'>=</span> <span class='id identifier rubyid_name_args'>name_args</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_name_args'>name_args</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
  <span class='kw'>if</span> <span class='ivar'>@cookbook_name</span>
    <span class='id identifier rubyid_repo'>repo</span> <span class='op'>=</span> <span class='id identifier rubyid_get_all_repos'>get_all_repos</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='id identifier rubyid_v'>v</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>name</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='ivar'>@cookbook_name</span> <span class='rbrace'>}</span>
  <span class='kw'>else</span>
    <span class='comment'>#repos = all_repos
</span>    <span class='const'>Chef</span><span class='op'>::</span><span class='const'>Log</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Please specify a cookbook name</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
    <span class='id identifier rubyid_exit'>exit</span> <span class='int'>1</span>
  <span class='kw'>end</span>

  <span class='kw'>if</span> <span class='id identifier rubyid_repo'>repo</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
    <span class='const'>Chef</span><span class='op'>::</span><span class='const'>Log</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot find the repository: </span><span class='embexpr_beg'>#{</span><span class='rbrace'>}</span><span class='tstring_content'> within github</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
    <span class='id identifier rubyid_exit'>exit</span> <span class='int'>1</span>
  <span class='kw'>end</span>

  <span class='id identifier rubyid_github_link'>github_link</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_repo'>repo</span><span class='lbracket'>[</span><span class='ivar'>@cookbook_name</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='lparen'>(</span><span class='id identifier rubyid_get_repo_clone_link'>get_repo_clone_link</span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='rparen'>)</span>
  <span class='kw'>if</span> <span class='id identifier rubyid_github_link'>github_link</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_github_link'>github_link</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
    <span class='const'>Chef</span><span class='op'>::</span><span class='const'>Log</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot find the link for the repository with the name: </span><span class='embexpr_beg'>#{</span><span class='ivar'>@cookbook_name</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
    <span class='id identifier rubyid_exit'>exit</span> <span class='int'>1</span>
  <span class='kw'>end</span>

  <span class='kw'>if</span> <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='symbol'>:github</span><span class='rbracket'>]</span>
   <span class='id identifier rubyid_get_clone'>get_clone</span><span class='lparen'>(</span><span class='id identifier rubyid_github_link'>github_link</span><span class='comma'>,</span> <span class='ivar'>@cookbook_name</span><span class='rparen'>)</span>
  <span class='kw'>else</span> <span class='comment'># Copy downloaded version to #{@github_tmp}/git
</span>      <span class='id identifier rubyid_cpath'>cpath</span> <span class='op'>=</span> <span class='id identifier rubyid_cookbook_path_valid?'>cookbook_path_valid?</span><span class='lparen'>(</span><span class='ivar'>@cookbook_name</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
      <span class='kw'>if</span> <span class='id identifier rubyid_cpath'>cpath</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
        <span class='const'>Chef</span><span class='op'>::</span><span class='const'>Log</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot find any local repository with the name: </span><span class='embexpr_beg'>#{</span><span class='ivar'>@cookbook_name</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
        <span class='const'>Chef</span><span class='op'>::</span><span class='const'>Log</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Please use the option -g if you want to diff the github repository</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
        <span class='id identifier rubyid_exit'>exit</span> <span class='int'>1</span>
      <span class='kw'>end</span>
      <span class='id identifier rubyid_tpath'>tpath</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@github_tmp</span><span class='rbrace'>}</span><span class='tstring_content'>/git</span><span class='tstring_end'>&quot;</span></span>
      <span class='kw'>if</span> <span class='op'>!</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span><span class='id identifier rubyid_tpath'>tpath</span><span class='rparen'>)</span>
          <span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_makedirs'>makedirs</span><span class='lparen'>(</span><span class='id identifier rubyid_tpath'>tpath</span><span class='rparen'>)</span>
      <span class='kw'>end</span>
      <span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_cp_r'>cp_r</span> <span class='id identifier rubyid_cpath'>cpath</span><span class='comma'>,</span> <span class='id identifier rubyid_tpath'>tpath</span>
  <span class='kw'>end</span>

	    <span class='id identifier rubyid_version'>version</span> <span class='op'>=</span> <span class='id identifier rubyid_get_cookbook_copy'>get_cookbook_copy</span><span class='lparen'>(</span><span class='ivar'>@cookbook_name</span><span class='comma'>,</span> <span class='id identifier rubyid_cookbook_version'>cookbook_version</span><span class='rparen'>)</span>

	    <span class='id identifier rubyid_do_diff'>do_diff</span><span class='lparen'>(</span><span class='ivar'>@cookbook_name</span><span class='comma'>,</span> <span class='id identifier rubyid_version'>version</span><span class='rparen'>)</span>
  <span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_remove_entry'>remove_entry</span><span class='lparen'>(</span><span class='ivar'>@github_tmp</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>

  </div>

</div>

    <div id="footer">
  Generated on Wed Oct 30 21:59:25 2013 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.8.7.2 (ruby-1.9.3).
</div>

  </body>
</html>